package org.interfaceadaptation.test.notnull;

import java.util.ArrayList;
import java.util.List;

public class VerifierChain implements Verifier {
	
	private List<Verifier> verifiers;
	
	public VerifierChain(List<Verifier> verifiers) {
		this.verifiers = new ArrayList<Verifier>(verifiers);
	}

	@Override
	public boolean verify(Object element) {
		for(Verifier verifier:verifiers) {
			if (verifier.verify(element)) {
				return true;
			}
		}
		return false;
	}
}
